#ifndef TAGSPEC_H
#define TAGSPEC_H
//  File:         TagSpec.h
//  Author:       Scott Nordmann & Lauren Wallace
//  Description:  A class definition for the TagSpec.
#include <string>
#include <vector>
#include "Tag.h"
#include "Entry.h"

class TagSpec
{
public:
	TagSpec();
	TagSpec(const std::string& nam);

	void shutDown(std::ofstream& ofsave);

	std::string getName() const;

	void setName(const std::string nam);

	void display()const;
	void displayEntries()const;

	void populate(const std::string& nam);

	Tag* halfTag();
	void removeHalfTag(Tag& tag);

	void removeTag(Tag* tag);

	bool operator==(const TagSpec& ts) const;
	bool operator!=(const TagSpec& ts) const;
	bool operator==(const std::string& nam) const;
	bool operator!=(const std::string& nam) const;
	bool operator<(const TagSpec& ts) const;
	bool operator>(const TagSpec& ts) const;

private:
	std::string name;
	std::vector<Tag*> tags;
};

std :: ostream& operator<<(std::ostream& os, const TagSpec& T);

inline std::string TagSpec::getName() const { return name; }

inline bool TagSpec::operator==(const TagSpec& ts) const
{
	return (getName() == ts.getName());
}

inline bool TagSpec::operator!=(const TagSpec& ts) const
{
	return !(*this == ts);
}
inline bool TagSpec::operator==(const std::string& nam) const
{
	return (getName() == nam);
}

inline bool TagSpec::operator!=(const std::string& nam) const
{
	return !(*this == nam);
}

inline bool TagSpec::operator<(const TagSpec& ts) const
{
	return (getName() < ts.getName());
}

inline bool TagSpec::operator>(const TagSpec& ts) const
{
	return !(*this < ts || *this == ts);
}

#endif